package service;

import dao.GoodMapper;

import pojo.Books;
import pojo.Goods;
import pojo.Moneys;

import java.util.List;

public class GoodServiceImpl implements GoodService {

//    调用dao层的操作，设置一个set接口，方便Spring管理
    private GoodMapper goodMapper;

    public void setGoodMapper(GoodMapper goodMapper) {
        this.goodMapper = goodMapper;
    }

    public int addBook(Goods goods) {
        return goodMapper.addBook(goods);
    }

    public List<Goods> queryAllBook() {
        return goodMapper.queryAllBook();
    }

    public int deleteBookById(int id) {
        return goodMapper.deleteBookById(id);
    }

}
